package com.fg.cloud.manager.entry.product;

import java.math.BigDecimal;
import java.util.List;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fg.cloud.common.annotation.Column;
import com.fg.cloud.common.convert.CustomBigDecimalSerialize;
import com.fg.cloud.common.finals.Compare;
import com.fg.cloud.manager.entry.BaseEntity;
import com.fg.cloud.manager.entry.product.vo.ProductMoreUnitVo;

/**
 * @author liushengchao
 * @Description: 商品SKU实体类
 * @date 2017年6月23日下午4:53:47
 *
 */
public class ProductSkuEntity  extends BaseEntity{

	private static final long serialVersionUID = -3714898714774532098L;

	private Long id ; //skuId
	
	@Column(value="ps.facId")
	private Long facId ; //厂商ID（冗余商品信息）
	
    private Long productId; //商品ID

    @Column(value="ps.productName",compare=Compare.LIKE)
    private String productName;//sku名称

    @Column(value="ps.productNumber",compare=Compare.LIKE)
    private String productNumber; //sku编码

    @Column(value="ps.productCategory")
    private Long productCategory ;//商品分类（冗余商品信息）
    
    private Long categoryId ;  //商品分类ID
    
    @Column(value="pc.categoryNumber" ,compare=Compare.LIKE)
    private String categoryNumber ;//商品编码
    
    private String categoryName ; //商品分类名称（展示信息）
    
    private String productImg; //商品缩略图（冗余商品信息）

    @JsonSerialize(using=CustomBigDecimalSerialize.class)
    private BigDecimal productPrice; //sku价格

    private BigDecimal productVolume ; //sku体积
    
    private BigDecimal productWeight ; //sku重量
    
    private Integer isDefault ;
    
    @Column
    private Integer isGround ; //上下架
    
    private Integer isDelete ; //是否删除
    
    @Column(value="ps.productUnit")
    private Long productUnit; //商品单位
    
    private String unitName ; //单位名称
    
	private Integer stock; //sku库存量
	
	private String moreUnitContent;
	
	private Integer isShowMoreUnit = 0;
    
	private String barcode; // sku条码

    private Integer warning; // sku库存预警值
    
    private int precision ; // 商品购买精度
    
    private String moreUnit ; // 多单位数据
    
    private List<ProductSkuImgEntity> imgList ; //SKU图册
    
    private List<ProductMoreUnitVo> moreUnitList;
    
    @Column(value="productSpec",compare=Compare.LIKE)
    private String productSpec ; //SKU规格组合
    
    private Integer multiUnit ; //是否启用多单位，0 不启用  1 启用
    
    public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	public String getCategoryNumber() {
		return categoryNumber;
	}

	public Long getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
	}

	public void setCategoryNumber(String categoryNumber) {
		this.categoryNumber = categoryNumber;
	}

	public String getUnitName() {
		return unitName;
	}

	public void setUnitName(String unitName) {
		this.unitName = unitName;
	}

	public Integer getStock() {
		return stock;
	}

	public void setStock(Integer stock) {
		this.stock = stock;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getFacId() {
		return facId;
	}

	public void setFacId(Long facId) {
		this.facId = facId;
	}

	public String getProductSpec() {
		return productSpec;
	}

	public void setProductSpec(String productSpec) {
		this.productSpec = productSpec;
	}

	public Long getProductId() {
        return productId;
    }

    public void setProductId(Long productId) {
        this.productId = productId;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName == null ? null : productName.trim();
    }

    public String getProductNumber() {
        return productNumber;
    }

    public void setProductNumber(String productNumber) {
        this.productNumber = productNumber == null ? null : productNumber.trim();
    }

    public String getProductImg() {
        return productImg;
    }

    public void setProductImg(String productImg) {
        this.productImg = productImg == null ? null : productImg.trim();
    }

    public BigDecimal getProductPrice() {
        return productPrice;
    }

    public void setProductPrice(BigDecimal productPrice) {
        this.productPrice = productPrice;
    }

    public String getBarcode() {
        return barcode;
    }

    public void setBarcode(String barcode) {
        this.barcode = barcode == null ? null : barcode.trim();
    }

    public Integer getWarning() {
        return warning;
    }

    public void setWarning(Integer warning) {
        this.warning = warning;
    }

    public Long getProductCategory() {
		return productCategory;
	}

	public void setProductCategory(Long productCategory) {
		this.productCategory = productCategory;
	}

	public Integer getIsGround() {
		return isGround;
	}

	public void setIsGround(Integer isGround) {
		this.isGround = isGround;
	}

	public Long getProductUnit() {
		return productUnit;
	}


	public void setProductUnit(Long productUnit) {
		this.productUnit = productUnit;
	}

	public BigDecimal getProductVolume() {
		return productVolume;
	}

	public void setProductVolume(BigDecimal productVolume) {
		this.productVolume = productVolume;
	}

	public BigDecimal getProductWeight() {
		return productWeight;
	}

	public void setProductWeight(BigDecimal productWeight) {
		this.productWeight = productWeight;
	}

	public void setMultiUnit(Integer multiUnit) {
		this.multiUnit = multiUnit;
	}
	
	public String getMoreUnit() {
		return moreUnit;
	}

	public void setMoreUnit(String moreUnit) {
		this.moreUnit = moreUnit;
	}
	
	public Integer getIsDefault() {
		return isDefault;
	}

	public void setIsDefault(Integer isDefault) {
		this.isDefault = isDefault;
	}

	public Integer getMultiUnit() {
		return multiUnit;
	}

	public List<ProductSkuImgEntity> getImgList() {
		return imgList;
	}

	public void setImgList(List<ProductSkuImgEntity> imgList) {
		this.imgList = imgList;
	}

	public Integer getIsDelete() {
		return isDelete;
	}

	public void setIsDelete(Integer isDelete) {
		this.isDelete = isDelete;
	}

	public int getPrecision() {
		return precision;
	}

	public void setPrecision(int precision) {
		this.precision = precision;
	}

	public List<ProductMoreUnitVo> getMoreUnitList() {
		return moreUnitList;
	}

	public void setMoreUnitList(List<ProductMoreUnitVo> moreUnitList) {
		this.moreUnitList = moreUnitList;
	}

	public String getMoreUnitContent() {
		return moreUnitContent;
	}

	public void setMoreUnitContent(String moreUnitContent) {
		this.moreUnitContent = moreUnitContent;
	}

	public Integer getIsShowMoreUnit() {
		return isShowMoreUnit;
	}

	public void setIsShowMoreUnit(Integer isShowMoreUnit) {
		this.isShowMoreUnit = isShowMoreUnit;
	}

	
}